<?php
 @header("content-type:text/html;charset=utf-8");
 @header("Access-Control-Allow-Origin:*");
 $conn = mysql_connect("localhost:3306","root","root");
 mysql_select_db("1904");
 mysql_query("set character set utf8");
 mysql_query("set names utf8");
 if(isset($_GET["good_id"])){
    $good_id=$_GET["good_id"];
    $sql="select * from goodslist where goods_id='$good_id'";
 }
 else{
   $sql="select * from goodslist";
 }
 $result=mysql_query($sql);
 $goodslist=array();
 while($item=mysql_fetch_assoc($result)){
 $goodslist[]=$item;
 }
 echo json_encode($goodslist)
?>